// 生成六边形点位
export const getPoints = (width = 200, height = 200) => {
  let cx = width / 2,
    cy = height / 2,
    r = Math.min(width, height) / 2

  const points = []

  for (let i = 0; i < 6; i++) {
    const x = cx - r * Math.sin(((2 * i + 1) * Math.PI) / 6)
    var y = cy + r * Math.cos(((2 * i + 1) * Math.PI) / 6)

    points.push(`${x.toFixed(2)},${y.toFixed(2)}`)
  }

  return points.join(' ')
}
